home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 6: Level 6
/
17 Bit - Level 6 (1998)(Epic Marketing)[!].iso
/
quartz
/
q0498.dms
/
q0498.adf
/
NIBDGEN
< prev
next >
Wrap
Text File
|
1992-06-07
|
3KB
|
163 lines
curdsk=1
colour=1
yyval=12
skipdel=0
connect=drives()
cmp connect,-1,0,goto byebye
drivenum=nibcopy(connect,templat,1)
cmp drivenum,0,-1,goto byebye
poke(remdsk+19,drivenum+48)
poke(insdsk2+6,drivenum+48)
pnf: dc.b "Protection not found!",0
pnf2: dc.b "*** PARAMETER FAILED! ***",0
worktxt:dc.b "Working, please stand by...",0
prof: dc.b "*** Parameter Successful! ***",0
remdsk: dc.b "Remove disk from DF0: then click in this window...",0
insdsk: dc.b "Insert BACKUP of",0
insdsk2:dc.b " in DF0: then click in this window...",0
dc.w 0
oritab: dc.l orig1,fix1,orig2,fix2,orig3,fix3,orig4,fix4,orig5,fix5
dc.l orig6,fix6,orig7,fix7,orig8,fix8,orig9,fix9
dc.l orig10,fix10,orig11,fix11,orig12,fix12,orig13,fix13
dc.l orig14,fix14,orig15,fix15,orig16,fix16,orig17,fix17
dc.l orig18,fix18,orig19,fix19,orig20,fix20,orig21,fix21
dc.l orig22,fix22,orig23,fix23,orig24,fix24,orig25,fix25
dc.l orig26,fix26,orig27,fix27,orig28,fix28,orig29,fix29
dc.l orig30,fix30,orig31,fix31,orig32,fix32,orig33,fix33
dc.l orig34,fix34,orig35,fix35,orig36,fix36,orig37,fix37
dc.l orig38,fix38,orig39,fix39,orig40,fix40,orig41,fix41
dc.l orig42,fix42,orig43,fix43,orig44,fix44,orig45,fix45
dc.l 0,0
* Open Window and print intro text...
start: validate(drivenum,1)
cmp ^winname,"con:",0,winname=winname+18
pokel(wtitle,winname)
gosub openwin
cmp docopy,1,0,goto main
gosub remm
txtptr=insdsk
gosub print3d
colour=3
txtptr=dname
gosub print3d
colour=1
txtptr=insdsk2
gosub print3d
gosub waitsgn
cmp class,$200000,2,goto chkclow
cmp code,$1b,0,goto remprta
chkclow:cmp class,$200,0,goto remprta
skipdel=1
main: txtptr=worktxt
gosub print3d
cmp skipdel,0,2,goto begit
delay(100)
begit: blklen=winname-xcopy&$fffffe00
xboot=allocmem(blklen,2)
memmove(xboot,xcopy,blklen)
ret=trackdisk(drivenum,3,0,xboot,blklen)
ret=trackdisk(drivenum,4,0,0,0)
freemem(xboot,blklen)
pos=0
pointer=oritab
looper: orig=^pointer
pointer=pointer+4
fix=^pointer
pointer=pointer+4
pval=^pointer
cmp pval,0,0,top=garbage
cmp pval,0,2,top=pval
* Scan file for our string and replace if found...
pos=dscan(drivenum,orig,fix-orig,fix,top-fix,pos,hfix)
cmp pos,-2,0,goto errpnf
cmp pval,0,2,goto looper
txtptr=prof
gosub print3d
delay(100)
cmp note1,0,0,goto ky1
colour=3
txtptr=note1
gosub print3d
cmp note2,0,0,goto ky1
txtptr=note2
gosub print3d
cmp note3,0,0,goto ky1
txtptr=note3
gosub print3d
ky1: colour=1
yyval=yyval+10
txtptr=remdsk
gosub print3d
ky2: gosub remm
gosub waitsgn
cmp mess,0,0,goto ky2
cmp numdsk,2,-1,goto bye0
yyval=yyval+10
txtptr=copyrst
gosub print3d
delay(50)
ky3: curdsk=curdsk+1
cmp curdsk,numdsk,1,goto bye0
tensv=curdsk/10&$ffff
onesv=tensv*10
onesv=curdsk-onesv
poke(dskm1,tensv+48)
poke(dskm1+1,onesv+48)
tensv=numdsk/10&$ffff
onesv=tensv*10
onesv=numdsk-onesv
poke(dskm2,tensv+48)
poke(dskm2+1,onesv+48)
docopy=simplereq(cpytitl,nxtdskm)
cmp docopy,1,-1,goto bye0
drivenum=fcopy(-1)
cmp drivenum,0,-1,goto bye0
goto ky3
keyout: gosub remm
gosub waitsgn
cmp mess,0,0,goto keyout
bye0: gosub closwin
byebye: validate(drivenum,0)
end
errpnf: txtptr=pnf
gosub print3d
goto prii5a
remprt: delay(150)
remprta:yyval=yyval+10
txtptr=remdsk
gosub print3d
goto keyout
prii5a: txtptr=pnf2
gosub print3d
goto remprt
#i "Params:WINHAND"